{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#---------------------------------------------------------------------\n",
    "#\n",
    "# Include and run all the Python code snippets from the H2O Deep Learning Vignette.\n",
    "#\n",
    "# The snippets are broken out into separate files so the exact same\n",
    "# piece of code both shows up in the document and is run by this\n",
    "# script.\n",
    "#\n",
    "# Currently these scripts replicate the GLM ipynb version, but are not finished.",
    "#\n",
    "#---------------------------------------------------------------------"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import h2o"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "import os\n",
    "print(os.getcwd())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "h2o.init()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "h2o.remove_all()\n",
    "execfile(\"deeplearning/deeplearning_gaussian_example.py\")\n",
    "\n",
    "h2o.remove_all()\n",
    "execfile(\"deeplearning/deeplearning_binomial_example.py\")\n",
    "\n",
    "h2o.remove_all()\n",
    "execfile(\"deeplearning/deeplearning_poisson_example.py\")\n",
    "\n",
    "h2o.remove_all()\n",
    "execfile(\"deeplearning/deeplearning_gamma_example.py\")\n",
    "\n",
    "h2o.remove_all()\n",
    "execfile(\"deeplearning/deeplearning_tweedie_example.py\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "h2o.remove_all()\n",
    "execfile(\"deeplearning/coerce_column_to_factor.py\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "h2o.remove_all()\n",
    "execfile(\"deeplearning/deeplearning_cross_validation.py\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false,
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "h2o.remove_all()\n",
    "execfile(\"deeplearning/deeplearning_stopping_criteria.py\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "h2o.remove_all()\n",
    "execfile(\"deeplearning/deeplearning_grid_search_over_alpha.py\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# Not supported right now.\n",
    "#\n",
    "# h2o.remove_all()\n",
    "# execfile(\"deeplearning/deeplearning_grid_search_over_lambda.py\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "h2o.remove_all()\n",
    "execfile(\"deeplearning/deeplearning_model_output_10.py\")\n",
    "execfile(\"deeplearning/deeplearning_model_output_20.py\")\n",
    "execfile(\"deeplearning/deeplearning_model_output_30.py\")\n",
    "execfile(\"deeplearning/deeplearning_model_output_40.py\")\n",
    "execfile(\"deeplearning/deeplearning_accessors.py\")\n",
    "execfile(\"deeplearning/deeplearning_confusion_matrix.py\")\n",
    "execfile(\"deeplearning/deeplearning_scoring_history.py\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "h2o.remove_all()\n",
    "execfile(\"deeplearning/deeplearning_binomial_predictions_with_response.py\")\n",
    "execfile(\"deeplearning/deeplearning_binomial_predictions_without_response.py\")\n",
    "execfile(\"deeplearning/deeplearning_recalculate_predict.py\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "h2o.remove_all()\n",
    "execfile(\"deeplearning/deeplearning_download_pojo.py\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
